#ifndef MYLABEL_H
#define MYLABEL_H
#include <QLabel>
#include<QMouseEvent>
#include"painter.h"
#include"image.h"

class MyLabel:public QLabel
{
public:
    explicit MyLabel(QWidget *parent= nullptr);


    void mousePressEvent(QMouseEvent *ev);
    void mouseMoveEvent(QMouseEvent *ev);
    void mouseReleaseEvent(QMouseEvent *ev);
    void SetisPaint(bool press,Painter* p=nullptr,Image* im=nullptr,Image** ori=nullptr);

private:
    bool isPaint;
    Painter* paint;
    Image* img;
    Image** origin;
};





#endif // MYLABEL_H
